COPADS IV: Fixed Time-Step ODE Solvers for a System of Equations Implemented as a Set of Python Functions
نویسنده
چکیده
Ordinary differential equation (ODE) systems are commonly used many different fields. The de-facto method to implement an ODE system in Python programming using SciPy requires the entire system to be implemented as a single function, which only allow for inline documentation. Although each equation can be broken up into sub-equations, there is no compart-mentalization of sub-equations to its ODE. A better method will be to implement each ODE as a function. This encapsulates the subequations to its ODE, and allow for function and inline documentation, resulting in better maintainability. This study presents the implementation 11 ODE solvers that enable each ODE in a system to be implemented as a function. Three enhancements will be added. Firstly, the solvers will be implemented as generators to allow for virtually infinite simulation and returning a stream of intermediate results for analysis. Secondly, the solvers will allow for non-ODE-bounded variables or solution vector to improve code and results documentation. Lastly, a means to set upper and lower boundary of ODE solutions will be added. Validation testing shows that the enhanced ODE solvers give comparable results to SciPy’s default ODE solver. The implemented solvers are incorporated into COPADS repository (https://github.com/copads/copads).
منابع مشابه
On second derivative 3-stage Hermite--Birkhoff--Obrechkoff methods for stiff ODEs: A-stable up to order 10 with variable stepsize
Variable-step (VS) second derivative $k$-step $3$-stage Hermite--Birkhoff--Obrechkoff (HBO) methods of order $p=(k+3)$, denoted by HBO$(p)$ are constructed as a combination of linear $k$-step methods of order $(p-2)$ and a second derivative two-step diagonally implicit $3$-stage Hermite--Birkhoff method of order 5 (DIHB5) for solving stiff ordinary differential equations. The main reason for co...
متن کاملAutomatic formulation of falling multiple flexible-link robotic manipulators using 3×3 rotational matrices
In this paper, the effect of normal impact on the mathematical modeling of flexible multiple links is investigated. The response of such a system can be fully determined by two distinct solution procedures. Highly nonlinear differential equations are exploited to model the falling phase of the system prior to normal impact; and algebraic equations are used to model the normal collision of this ...
متن کاملMathematical modeling of a fixed bed chromatographic reactor for Fischer Tropsch synthesis
In this research, Fischer Tropsch synthesis (FTS) has been modeled in the fixed bed chromatographic reactor for the first time by applying a rather complex dispersed plug flow model for fluid phase and linear driving force (LDF) model for adsorbent. Model equations are dynamic, multi-component, non-linear and heterogeneous including reaction and adsorption simultaneously Complex kinetics fo...
متن کاملLagrangian Relaxation Method for the Step fixed-charge Transportation Problem
In this paper, a step fixed charge transportation problem is developed where the products are sent from the sources to the destinations in existence of both unit and step fixed-charges. The proposed model determines the amount of products in the existing routes with the aim of minimizing the total cost (sum of unit and step fixed-charges) to satisfy the demand of each customer. As the problem i...
متن کاملSolving time-fractional chemical engineering equations by modified variational iteration method as fixed point iteration method
The variational iteration method(VIM) was extended to find approximate solutions of fractional chemical engineering equations. The Lagrange multipliers of the VIM were not identified explicitly. In this paper we improve the VIM by using concept of fixed point iteration method. Then this method was implemented for solving system of the time fractional chemical engineering equations. The ob...
متن کامل